package com.design.cjm.behavioral.Iterator.example;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: Jie Ming Chen
 * @Date: 2018/9/24
 * @Version 1.0
 */
public class ConcreteAggregate extends Aggregate{

    private List<Object> items = new ArrayList<>();

    @Override
    public Iterator createIterator() {
        return new ConcreteIterator(this);
    }

    public int getCount() {
        return items.size();
    }

    public List<Object> getItems() {
        return items;
    }
}
